/*
* Copyright 2017 Yonyou Auto Information Technology（Shanghai） Co., Ltd. All Rights Reserved.
*
* This software is published under the terms of the YONYOU Software
* License version 1.0, a copy of which has been included with this
* distribution in the LICENSE.txt file.
*
* @Project Name : marketing-service-shopping
*
* @File name : ShoppingServiceInterface.java
*
* @Author : Administrator
*
* @Date : 2017年4月18日
*
----------------------------------------------------------------------------------
*     Date       Who       Version     Comments
* 1. 2017年4月18日    Administrator    1.0
*
*
*
*
----------------------------------------------------------------------------------
*/

package com.yonyou.marketing.app.api.service;

import java.util.List;
import java.util.Map;

import javax.validation.Valid;
import org.marketing.common.Response;
import org.marketing.common.dto.MQReceiveResult;
import org.marketing.common.dto.carOwner.CarOwnerDto;
import org.marketing.common.dto.customerInfo.CarInfoDto;
import org.marketing.common.dto.customerInfo.CounselorDto;
import org.marketing.common.dto.leads.InsuranceDto;
import org.marketing.common.event.BizEvent;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 *
 * @author Administrator
 * @date 2017年4月18日
 */

@FeignClient(name = "SERVICE-CUSTOMER")
public interface CustomerServiceInterface {

	/**
	 * 注册会员(车主)
	 * 
	 * @author Administrator
	 * @date 2017年11月6日
	 * @param request
	 * @return
	 */
	@RequestMapping(value = "/customer/api/v1/insertCarOwner", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
	Response<Map<String, Object>> insertCarOwner(@RequestBody @Valid CarOwnerDto memberDto,
			@RequestParam("openId") String openId);

	/**
	 * 微信关注
	 * 
	 * @author Administrator
	 * @date 2017年11月6日
	 * @param request
	 * @return
	 */
	@RequestMapping(value = "/customer/api/v1/event", method = RequestMethod.POST)
	MQReceiveResult event(@RequestBody BizEvent event);

	/**
	 * 车主认证(绑车)
	 * 
	 * @author Administrator
	 * @date 2017年11月6日
	 * @param request
	 * @return
	 */
	@RequestMapping(value = "/customer/api/v1/carInfo", method = RequestMethod.POST)
	Response<Map<String, Object>> saveCarInfo(@RequestBody CarInfoDto carInfoDto,
			@RequestParam("userId_") String userId_);

	/**
	 * 修改用户车子绑定状态
	 * 
	 * @author Administrator
	 * @date 2017年11月14日
	 * @param ownercarrelationdto
	 * @param openId
	 * @return
	 */
	@RequestMapping(value = "/customer/api/v1/updateCarinfoStu", method = RequestMethod.POST)
	public Map<String, Object> updateCarinfoStu(@RequestParam("carId") String carId,
			@RequestParam("userId_") String userId_);

	/**
	 * 更新车辆信息
	 * 
	 * @author Administrator
	 * @date 2017年11月14日
	 * @param carinfodto
	 * @return
	 */
	@RequestMapping(value = "/customer/api/v1/updateCarinfo", method = RequestMethod.GET)
	public Map<String, Object> updateCarinfo(@RequestBody CarInfoDto carinfodto);

	/**
	 * 获取保险公司
	 * 
	 * @author Administrator
	 * @date 2017年11月14日
	 * @return
	 */
	@RequestMapping(value = "/customer/api/v1/InsuranceMap", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
	public List<InsuranceDto> getInsuranceMap();

	/**
	 * 获取销售顾问列表
	 * 
	 * @author Administrator
	 * @date 2017年11月17日
	 * @param request
	 * @return
	 */
	@RequestMapping(value = "/customer/api/v1/counselors", method = RequestMethod.GET)
	List<CounselorDto> getCounselorData(@RequestParam("dealerCode") String dealerCode,
			@RequestParam("positionId") String positionId);
}
